#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
p31_video_select.py

根据用户信息，选择合适的视频。
"""

import pandas as pd
import numpy as np
from datetime import datetime


def f(r, ks):
    return sum([ks[id] * r[id] for id in [1, 4, 6, 7, 8]])

ks = [1,1,1,1,1,1,1,1,1]

video_csv = 'videos.csv'
user_portraits_csv = 'user_portraits.csv'

dfv = pd.read_csv(video_csv)
dfu = pd.read_csv(user_portraits_csv)

print(f'成功加载 {video_csv}, 数据量：{len(dfv)}, 成功加载 {user_portraits_csv}, 数据量：{len(dfu)}')

# 根据dfu的特征，从dfv中选择合适的视频。
# 选择合适的标签 